package com.xdxc.feign;

import com.xdxc.model.vo.BankQuestionVo;
import com.xdxc.response.Result;
import com.xdxc.vo.QuestionWithOptionsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "xdxc-question")
public interface QuestionFeign {

    @GetMapping("/question-service/questionCorrect/{quId}")
    Result<QuestionWithOptionsVo> getQuestion(@RequestHeader("Authorization") String token , @PathVariable Long quId);



    @GetMapping("/questionBank/page")
    Result getQuestion(@RequestHeader("Authorization") String token ,
                       @RequestParam(defaultValue = "1") Integer pageNum,
                       @RequestParam(defaultValue = "10") Integer pageSize);

    @GetMapping("/bank-questions/pageBankQuestion")
    Result<List<BankQuestionVo>> getBankQuestion(
            @RequestHeader("Authorization") String token ,
                                           @RequestParam(defaultValue = "1") Integer pageNum,
                                           @RequestParam(defaultValue = "10") Integer pageSize,
            @RequestParam Long bankId);




}
